package com.sx.art2.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.sx.art2.beans.AuctionInfo;
import com.sx.art2.beans.Order;
import com.sx.art2.service.AuctionInfoService;
import com.sx.art2.tools.Page;

@Controller
public class PagesController {
	
	@Autowired
	AuctionInfoService auctionInfoService;
	  @RequestMapping("/register") //���巽����
      public ModelAndView register(){
      ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
      retMap.setViewName("register");
      return retMap;
      }
	  @RequestMapping("/addsupplier1")
	  public ModelAndView addsupplier1(){
	      ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
	      retMap.setViewName("admin/addsupplier");
	      return retMap;
	      }
	  @RequestMapping("/login") //���巽����
      public ModelAndView login(){
      ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
      retMap.setViewName("login");
      return retMap;
      }
	  @RequestMapping("/login2") //���巽����
      public ModelAndView login2(){
      ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
      retMap.setViewName("admin/login");
      return retMap;
      }
	  @RequestMapping("/home") //���巽����
      public ModelAndView home(){
      ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
      retMap.setViewName("admin/home");
      return retMap;
      }
	  
	  @RequestMapping("/index") //���巽����
      public ModelAndView index(Page page){
      ModelAndView retMap = new ModelAndView();
		page.setPageSize(6);
		page.setTotalCount(auctionInfoService.getTotalCount());
		List<AuctionInfo> auctionInfoList=auctionInfoService.list(page,1);
		retMap.addObject("page", page);
		retMap.addObject("auctionInfoList", auctionInfoList);
      retMap.setViewName("index");
      return retMap;
      }
	  
	  @RequestMapping("/vip") //���巽����
      public ModelAndView vip(){
      ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
      retMap.setViewName("vip");
      return retMap;
      }
	 @RequestMapping("/recharge") //���巽����
      public ModelAndView recharge(){
      ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
      retMap.setViewName("recharge");
      return retMap;
      }
	 @RequestMapping("/withdraw") //���巽����
     public ModelAndView withdraw(){
     ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
     retMap.setViewName("withdraw");
     return retMap;
     }
	 @RequestMapping("/password") //���巽����
     public ModelAndView password(){
     ModelAndView retMap = new ModelAndView();  //�����µ�ModelAndView
     retMap.setViewName("password");
     return retMap;
     }
	 @RequestMapping("/mall") //定义方法名
     public ModelAndView mall(){
     ModelAndView retMap = new ModelAndView();  //返回新的ModelAndView
     retMap.setViewName("mall");
     return retMap;
     }	 
	 @RequestMapping("/pro_detail") //定义方法名
     public ModelAndView pro_detail(){
     ModelAndView retMap = new ModelAndView();  //返回新的ModelAndView
     retMap.setViewName("pro_detail");
     return retMap;
     }
	 @RequestMapping("/special") //定义方法名
     public ModelAndView special(){
     ModelAndView retMap = new ModelAndView();  //返回新的ModelAndView
     retMap.setViewName("special");
     return retMap;
     }
	 
	 @RequestMapping("/payment")
	 public ModelAndView payment(Order order) {
		 ModelAndView mv =new ModelAndView();
		 mv.addObject("order", order);
		 mv.setViewName("fukuan");
		 return mv;
	 }
	 @RequestMapping("/admin")
	 public ModelAndView admin() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("admin/index");
		 return mv;
	 }
	 @RequestMapping("/admin2")
	 public ModelAndView admin2() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("admin/home");
		 return mv;
	 }
	 @RequestMapping("/admin3")
	 public ModelAndView admin3() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("index");
		 return mv;
	 }
	 @RequestMapping("/admin4")
	 public ModelAndView admin4() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("admin/member-show");
		 return mv;
	 }
	 
	 @RequestMapping("/user_list")
	 public ModelAndView user_list() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("admin/user_list");
		 return mv;
	 }
	 
	 @RequestMapping("/Cover_management")
	 public ModelAndView Cover_management() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("admin/Cover_management");
		 return mv;
	 }
	 @RequestMapping("/picture-add")
	 public ModelAndView pictureadd(){
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("admin/picture-add");
		 return mv;		 
	 }
	 @RequestMapping("/scgmlc")
	 public ModelAndView scgmlc() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("scgmlc");
		 return mv;
	 }
	 @RequestMapping("/cjwt")
	 public ModelAndView cjwt() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("cjwt");
		 return mv;
	 }
	 @RequestMapping("/zcxy")
	 public ModelAndView zcxy() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("zcxy");
		 return mv;
	 }
	 @RequestMapping("/zhcz")
	 public ModelAndView zhcz() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("zhcz");
		 return mv;
	 }
	 @RequestMapping("/zhtx")
	 public ModelAndView zhtx() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("zhtx");
		 return mv;
	 }
	 @RequestMapping("/zffs")
	 public ModelAndView zffs() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("zffs");
		 return mv;
	 }
	 @RequestMapping("/gsjj")
	 public ModelAndView gsjj() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("gsjj");
		 return mv;
	 }
	 @RequestMapping("/contact")
	 public ModelAndView contact() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("contact");
		 return mv;
	 }
	 @RequestMapping("/jrwm")
	 public ModelAndView jrwm() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("jrwm");
		 return mv;
	 }
	 @RequestMapping("/wlsm")
	 public ModelAndView wlsm() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("wlsm");
		 return mv;
	 }
	 @RequestMapping("/mzsm")
	 public ModelAndView mzsm() {
		 ModelAndView mv=new ModelAndView();
		 mv.setViewName("mzsm");
		 return mv;
	 }
	 
}
